package 建造者模式.造小人;

import javax.swing.*;
import java.awt.Graphics;

/**
 * @author zyl
 * @Description
 * @since 2024/1/4 14:37
 */

public class Test extends JFrame {

    public Test(){
        setSize(400,800);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
    }
    public void paint(Graphics g){
        g.drawOval(150,120,30,30);//头
        g.drawRect(160,150,10,50);//身体
        g.drawLine(160,150,140,200);//左手
        g.drawLine(170,150,190,200);//右手
        g.drawLine(160,200,145,250);//左脚
        g.drawLine(170,200,185,250);//右脚
    }
    public static void main(String[] args) {
        new Test().setVisible(true);
    }
}
